<?php

class ValidatorEmpty extends sfValidatorBase {
	
	protected function doClean($value) {
		if(empty($value) || is_null($value) || strlen($value) == 0) {
			return '';
		}
		
		throw new sfValidatorError($this, 'invalid', array('value' => $value));
	}
}